package com.lxs.mall.model.dao;

import com.lxs.mall.model.pojo.User;
import org.apache.ibatis.annotations.Param;

/**
 * @author 小松
 */
public interface UserMapper {
    /**
     * @param id
     * @return
     */
    int deleteByPrimaryKey(Integer id);

    /**
     * @param row
     * @return
     */
    int insert(User row);

    /**
     * @param row
     * @return
     */
    int insertSelective(User row);

    /**
     * @param id
     * @return
     */
    User selectByPrimaryKey(Integer id);

    /**
     * @param row
     * @return
     */
    int updateByPrimaryKeySelective(User row);

    /**
     * @param row
     * @return
     */
    int updateByPrimaryKey(User row);

    /**
     * @param username
     * @return
     */
    User selectByName(String username);

    /**
     * @param username
     * @param password
     * @return
     */
    User selectLogin(@Param("username") String username, @Param("password") String password);

    /**
     * @param emailAddress
     * @return
     */
    User selectOneByEmailAddress(String emailAddress);
}